package com.iflytek.application.common.resttemplate;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.web.client.RequestCallback;

import java.io.IOException;

/**
 * Created by guanxf on 2016-03-04.
 */
@AllArgsConstructor
@NoArgsConstructor
public class ApplicationRequestCallback implements RequestCallback{

    private String applicationId;

    @Override
    public void doWithRequest(ClientHttpRequest clientHttpRequest) throws IOException {

    }
/*
    @Override
    public void doWithRequest(ClientHttpRequest request) throws IOException {
        if(null != ApplicationIdHolder.getApplicationId()){
            request.getHeaders().set(ApplicationConstants.HEADER_APPLICATION_ID, ApplicationIdHolder.getApplicationId());
        }else if(!StringUtils.isEmpty(applicationId)){
            request.getHeaders().set(ApplicationConstants.HEADER_APPLICATION_ID, applicationId);
        }
    }*/
}
